$( document ).on( "pageshow", "#feedbackPage", function( event ) {
	access_token=getQueryString("access_token");
	$( "#dataSubmit_feedback" ).on("click",function (){
		feedback_datasubmit("click");
	});	
	//text输入长度处理
	$("#mytext_feedbackPage").on("keyup",function (){
		var len = $("#mytext_feedbackPage").val().length; 
		var show = "" + len + "/50"; 
		$("#name_feedbackPage").html(show); 
	});	
});	
/**
 * 意见反馈提交
 */
function feedback_datasubmit(eventName){
	var dataAdv=$("textarea").val();
	if(dataAdv==undefined || dataAdv==null || dataAdv==""){
		alert_wx("fail","亲，反馈内容不能为空哦！");
		return false;
	}else if(dataAdv.length<5){
		alert_wx("fail","亲，反馈内容大于等于5个字哦！");
		return false;
	}
	$("#dataSubmit_feedback").off(eventName);
	$.ajax({
	  	url: rootPath+"/user/mailBox.do",
	  	type: "POST",
	  	dataType: "text",
		data: "access_token="+access_token+"&data="+dataAdv,
	  	success: function( response ) {
	  		var data=$.parseJSON(response);
			if(data.state=="200"){
				alert_wx("success","亲，提交成功！");
				$("textarea").val("");
				$("#name_feedbackPage").html("0/50"); 
				goBack();
			}else{
				alert_wx("fail",data.msg);
			}
	  	}
	});
}